package com.charles.video.api.feignService;

import com.charles.video.api.domain.MemberLog;
import com.charles.video.api.feignFallBack.RemoteLogServiceFallbackFactory;
import com.charles.video.common.core.constant.SecurityConstants;
import com.charles.video.common.core.responseDomain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteLogService", value = "video-system", fallbackFactory = RemoteLogServiceFallbackFactory.class)
public interface RemoteLogService {

    /**
     * 保存系统日志
     *
     * @param memberLog 日志实体
     * @param source         请求来源
     * @return 结果
     */
    @PostMapping("/member/log/saveLog")
    public R<Boolean> saveLog(@RequestBody MemberLog memberLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    

}
